﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace TauschFormat2
{
    /// <summary>
    /// Interaktionslogik für "App.xaml"
    /// </summary>
    public partial class App : Application
    {

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (Environment.CurrentDirectory.Contains("Program Files") || Environment.CurrentDirectory.Contains("Programme"))
            {
                string connstring = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Tauschformat\\Data";
                AppDomain.CurrentDomain.SetData("DataDirectory", connstring);
            }
            else
            {
                AppDomain.CurrentDomain.SetData("DataDirectory", Environment.CurrentDirectory + "\\Data");
            }
        }
    }
}
